enable_testing()
find_package(Check REQUIRED)
include_directories(${CHECK_INCLUDE_DIRS})
set(LIBS ${LIBS} ${CHECK_LIBRARIES})

include_directories(. ../src)

    set (HEADERS 
                test_backtracer_arm_exidx.h
                ../src/arm_utils.h
                ../src/check.h
                ../src/linux_arm_exidx_elf.h
                ../src/map_utils_linux_elf.h
                ../src/backtracer_arm_exidx.h
                ../src/debug.h
                ../src/linux_elf_utils.h
                ../src/map_utils_linux.h
                ../src/backtracer.h
                ../src/defs.h 
                ../src/linux_ptrace_utils.h
                ../src/memory_utils.h
                ../src/backtracer_linux_arm.h
                ../src/error_list.h 
                ../src/log.h
                ../src/backtracer_linux.h
                ../src/errors.h
                ../src/map_utils.h)
    set (SOURCES
                test_main.c
                test_backtracer_arm_exidx.c
                ../src/arm_utils.c
                ../src/errors.c
                ../src/backtracer_arm_exidx.c
                ../src/map_utils.c
                ../src/backtracer.c   
                ../src/linux_arm_exidx_elf.c
                ../src/map_utils_linux.c
                ../src/backtracer_linux_arm.c
                ../src/linux_elf_utils.c
                ../src/map_utils_linux_elf.c
                ../src/backtracer_linux.c
                ../src/linux_ptrace_utils.c 
                ../src/memory_utils.c
                ../src/debug.c   
                ../src/log.c)

add_executable(test_backtracer_arm_exidx ${HEADERS} ${SOURCES})
add_test(test_backtracer_arm_exidx  ${CMAKE_CURRENT_BINARY_DIR}/test_backtracer_arm_exidx)
target_link_libraries(test_backtracer_arm_exidx ${LIBS})


